/**
 * webpack4中import不支持变量
 * const resolve = name => () => import(`@/pages/${name}`)
 */
const resolve = name => resolve => require([`@/pages/${name}`], resolve)
// 🏷️ 妙健康app



const allRouter = [
    {
        path: '/login',
        name: 'Login',
        meta: {
            title: '登录'
        },
        component: resolve('login')
    },
    {
        path: '/apply',
        name: 'Apply',
        meta: {
            title: '入驻申请'
        },
        component: resolve('enter/apply')
    },
    {
        path: '/person-center',
        name: 'PersonCenter',
        meta: {
            title: '个人中心'
        },
        component: resolve('person/personCenter')
    },
]
/**
 * 20210913_app_v5.5.4
 * 设备测量数据
 */
const deviveDetailRouter = [
    {
        path:'/device/report/detail',
        name:'DeviceReoprtDetail',
        meta:{
            title:''
        },
        component: resolve('device/report/detail')
    }
]
// 🏷️ 基础路由
const otherRouter = [
    {
        path: '/404',
        name: 'NotFound',
        meta: {
            title: '404'
        },
        component: resolve('public/404')
    },
    {
        path: '/*',
        name: 'Undefined',
        redirect: '/404'
    }
]

export default [
    ...allRouter,
    ...deviveDetailRouter,
    ...otherRouter
]